import request from '@/until/request'
import Vue from 'vue';


// 重客户列表
export const customersCusList = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/cusList`,
    method: 'get',
    params: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
// 标记重要客户
export const customersSetFlag = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/setFlag`,
    method: 'get',
    params: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 重要客户详情
export const customersInfo = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/info`,
    method: 'get',
    params: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 跟进记录
export const customersFollowUpRecord = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/followUpRecord`,
    method: 'get',
    params: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 修改客户和跟进记录
export const customersUpdateQualificationsByUser = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/updateQualificationsByUser`,
    method: 'post',
    data: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}


// 新增客户
export const customersAdd = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/add`,
    method: 'post',
    data: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 上传excepl
export const customersUploadExcel = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/uploadExcel`,
    method: 'put',
    data: params,
    // timeout: 30000,
    headers: {
      isToken: true,
      'Content-Type': 'multipart/form-data',
      repeatSubmit: false
    }
  })
}



// 导入记录
export const customersImportRecord = (params) => {
  return request({
    url: `${Vue.prototype.$configURL}customers/importRecord`,
    method: 'get',
    params: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
